package cn.green.ztest;

import cn.green.ztest.testtree.TreeNodeDemo;

import java.util.ArrayList;
import java.util.List;


public class TestEntityTree {

    /*public static void main(String[] args) {

        List<TreeNodeDemo> list = new ArrayList<TreeNodeDemo>();

        TreeNodeDemo root = new TreeNodeDemo();
        root.setId("1");

        TreeNodeDemo node_first_1 = new TreeNodeDemo();
        node_first_1.setId("11");
        node_first_1.setParentId("1");
        list.add(node_first_1);
        TreeNodeDemo node_first_1_1 = new TreeNodeDemo();
        node_first_1_1.setId("111");
        node_first_1_1.setParentId("11");
        list.add(node_first_1_1);
        TreeNodeDemo node_first_1_2 = new TreeNodeDemo();
        node_first_1_2.setId("112");
        node_first_1_2.setParentId("11");
        list.add(node_first_1_2);

        TreeNodeDemo node_first_2 = new TreeNodeDemo();
        node_first_2.setId("12");
        node_first_2.setParentId("1");
        list.add(node_first_2);
        TreeNodeDemo node_first_2_1 = new TreeNodeDemo();
        node_first_2_1.setId("121");
        node_first_2_1.setParentId("12");
        list.add(node_first_2_1);
        TreeNodeDemo node_first_2_2 = new TreeNodeDemo();
        node_first_2_2.setId("122");
        node_first_2_2.setParentId("12");
        list.add(node_first_2_2);
        TreeNodeDemo treeNodeDemo = root.buildTree(list);
        System.out.println(treeNodeDemo);
        TreeNodeDemo treeNodeDemo1 = node_first_2.buildTree(list);
        System.out.println(treeNodeDemo1.toJsonString());

        List<TreeNodeDemo> treeNodeDemos = treeNodeDemo1.buildList();
        System.out.println(treeNodeDemos);

    }*/

}
